package com.ecr.hub.database.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;
import org.springframework.dao.EmptyResultDataAccessException;

import com.ecr.hub.model.user.Role;
import com.ecr.hub.model.user.User;


public interface IDaoUser {

	public List<User> getAllList() throws DataAccessException, EmptyResultDataAccessException;
	
	public List<User> getListConnected() throws DataAccessException, EmptyResultDataAccessException;

	public int create(User user) throws DataAccessException;

	public void update(User user) throws DataAccessException;

	public void delete(User user) throws DataAccessException;
	
	public List<Role> getAllRoles() throws DataAccessException, EmptyResultDataAccessException;
	
	public User connect(String login, String password, String sessionId) throws DataAccessException, EmptyResultDataAccessException;
	
	public User getById(int id) throws DataAccessException, EmptyResultDataAccessException;
	
	public void updatePassword(User user) throws DataAccessException;
	
	public void disconnect(User user) throws DataAccessException;
}
